package com.arpa.wms.domain.dto;

import com.arpa.wms.domain.entity.BasicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 出货单DTO
 * </p>
 *
 * @author LEO
 * @since 2020-08-07
 */
@Data
@ApiModel(value="DeliveryDTO对象", description="出货单")
public class DeliveryDTO extends BasicEntity {


    @ApiModelProperty(value = "出货单号")
    private String code;

    @ApiModelProperty(value = "所属机构")
    private String groupCode;

    @ApiModelProperty(value = "仓库")
    private String warehouseCode;

    @ApiModelProperty(value = "授权该账号的仓库集合")
    private List<String> warehouseCodes;

    @ApiModelProperty(value = "入驻商")
    private String shipmentCode;

    @ApiModelProperty(value = "授权该账号的货主集合")
    private List<String> shipmentCodes;

    @ApiModelProperty(value = "入驻商")
    private String shipmentName;

    @ApiModelProperty(value = "客户")
    private String customerCode;

    @ApiModelProperty(value = "来源单号")
    private String sourceCode;

    @ApiModelProperty(value = "来源单号集合")
    private List<String> sourceCodes;

    @ApiModelProperty(value = "总数量")
    private BigDecimal totalNum;

    @ApiModelProperty(value = "分配数量")
    private BigDecimal distributionNum;

    @ApiModelProperty(value = "分拣数量")
    private BigDecimal pickNum;

    @ApiModelProperty(value = "发货数量")
    private BigDecimal sendNum;

    @ApiModelProperty(value = "单据类型")
    private String type;

    @ApiModelProperty(value = "单据状态集合，用于查询多状态单据")
    private String statusArr;

    @ApiModelProperty(value = "状态")
    private String status;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "版本号")
    private Integer version;

    @ApiModelProperty(value = "第几页")
    private Integer pageNum=1;

    @ApiModelProperty(value = "每页条数")
    private Integer pageSize=10;

    @ApiModelProperty(value = "排序字段")
    private String sortField;

    @ApiModelProperty(value = "排序方式")
    private String sortType;

    @ApiModelProperty(value = "总数量下限")
    private BigDecimal totalNumStart;

    @ApiModelProperty(value = "分配数量下限")
    private BigDecimal distributionNumStart;

    @ApiModelProperty(value = "分拣数量下限")
    private BigDecimal pickNumStart;

    @ApiModelProperty(value = "发货数量下限")
    private BigDecimal sendNumStart;

    @ApiModelProperty(value = "总数量上限")
    private BigDecimal totalNumEnd;

    @ApiModelProperty(value = "分配数量上限")
    private BigDecimal distributionNumEnd;

    @ApiModelProperty(value = "分拣数量上限")
    private BigDecimal pickNumEnd;

    @ApiModelProperty(value = "发货数量上限")
    private BigDecimal sendNumEnd;

    @ApiModelProperty(value = "波次单号")
    private String wavePickingCode;

    @ApiModelProperty(value = "普通商品编码，用于订单处理商品查询，使用英文逗号隔开")
    private String normalGoodCodes;
    @ApiModelProperty(value = "承运商编码")
    private String carrierCode;

    @ApiModelProperty(value = "承运商编码集合")
    private List<String> carrierCodes;

    @ApiModelProperty(value = "承运商名称")
    private String carrierName;

    @ApiModelProperty(value = "商品编码，用于订单处理爆品商品查询，使用英文逗号隔开")
    private String goodCodes;

    @ApiModelProperty(value = "商品数量，用于订单处理爆品商品查询，使用英文逗号隔开")
    private String goodsNums;

    @ApiModelProperty(value = "是否包含商品，用于波次查询；0：只允许指定商品；1： 包含查询商品编码")
    private Integer containGoods;

    @ApiModelProperty(value = "波次查询时拼接生成的sql，用于查询子表信息", hidden = true)
    private String waveSql;

    @ApiModelProperty(value = "物流公司编码")
    private String logisticsCode;

    @ApiModelProperty(value = "发件人名称")
    private String senderName;

    /**
     * 发件人移动电话
     */
    @ApiModelProperty(value = "发件人移动电话")
    private String senderMobile;

    /**
     * 发件人省份
     */
    @ApiModelProperty(value = "发件人省份")
    private String senderProvince;

    /**
     * 发件人城市
     */
    @ApiModelProperty(value = "发件人城市")
    private String senderCity;

    /**
     * 发件人区县
     */
    @ApiModelProperty(value = "发件人区县")
    private String senderDistrict;

    /**
     * 发件人详细地址
     */
    @ApiModelProperty(value = "发件人详细地址")
    private String senderDetailAddress;

    /**
     * 收件人姓名
     */
    @ApiModelProperty(value = "收件人姓名")
    private String receiverName;

    /**
     * 收件人移动电话
     */
    @ApiModelProperty(value = "收件人移动电话")
    private String receiverMobile;

    /**
     * 收件人省份
     */
    @ApiModelProperty(value = "收件人省份")
    private String receiverProvince;

    /**
     * 收件人城市
     */
    @ApiModelProperty(value = "收件人城市")
    private String receiverCity;

    /**
     * 收件人城市集合
     */
    @ApiModelProperty(value = "收件人城市集合")
    private List<String> receiverCities;

    /**
     * 停发城市集合
     */
    @ApiModelProperty(value = "停发城市集合")
    private String stopAreas;

    /**
     * 停发区县集合（主要针对直辖市）
     */
    @ApiModelProperty(value = "停发区县集合（主要针对直辖市）")
    private String stopDistricts;

    /**
     * 收件人区县集合
     */
    @ApiModelProperty(value = "停发区县集合（主要针对直辖市）")
    private List<String> stopDistrictList;

    /**
     * 收件人区县
     */
    @ApiModelProperty(value = "收件人区县")
    private String receiverDistrict;

    /**
     * 收件人区县集合
     */
    @ApiModelProperty(value = "收件人区县集合")
    private List<String> receiverDistricts;

    /**
     * 收件人详细地址
     */
    @ApiModelProperty(value = "收件人详细地址")
    private String receiverDetailAddress;

    /**
     * 快递面单模板地址
     */
    @ApiModelProperty(value = "快递面单模板地址")
    private String templateUrl;

    @ApiModelProperty(value = "奇门传递过来的出库单号")
    private String deliveryOrderCode;

    @ApiModelProperty(value = "订单来源平台编码")
    private String sourcePlatformCode;

    @ApiModelProperty(value = "订单明细")
    private List<DeliveryItemDTO> deliveryItemDTOList;

    @ApiModelProperty(value = "最大订单量")
    private Integer maxOrderQuantity;

    @ApiModelProperty(value = "单据来源；wms: 手工创建； oms：OMS；qimen：奇门； other：其他；")
    private String sourceType;

    @ApiModelProperty(value = "发货单code集合")
    private List<String> deliveryCodes;


    @ApiModelProperty(value = "波次临时标识", hidden = true)
    private String temporaryCode;


    /**
     * 店铺名称
     */
    @ApiModelProperty(value = "店铺名称")
    private String shopNick;

    /**
     * 店铺名称集合
     */
    @ApiModelProperty(value = "店铺名称集合")
    private List<String> shopNicks;


    @ApiModelProperty(value = "种数下限")
    private BigDecimal goodsSortQuantityStart;

    @ApiModelProperty(value = "种数上限")
    private BigDecimal goodsSortQuantityEnd;

    @ApiModelProperty(value = "重量下限")
    private BigDecimal weightStart;

    @ApiModelProperty(value = "重量上限")
    private BigDecimal weightEnd;

    @ApiModelProperty(value = "体积下限")
    private BigDecimal volumeStart;

    @ApiModelProperty(value = "体积上限")
    private BigDecimal volumeEnd;

    @ApiModelProperty(value = "isvCode")
    private String isvCode;

    @ApiModelProperty(value = "isvCodes")
    private List<String> isvCodes;

    @ApiModelProperty(value = "面单号")
    private String waybillCode;

    @ApiModelProperty(value = "面单号集合")
    private List<String> waybillCodes;

    @ApiModelProperty(value = "商品标识")
    private String orderTag;

    @ApiModelProperty(value = "商品条码")
    private String goodsBarCode;

    @ApiModelProperty(value = "条件查询拼接sql", hidden = true)
    private String whereSql;

    @ApiModelProperty(value = "订单是否已取消 0-未取消 1-已取消")
    private Integer isCancel;

    @ApiModelProperty(value = "快递类型")
    private String carrierType;

    @ApiModelProperty(value = "面单打印次数")
    private Integer waybillPrintCount;

    @ApiModelProperty(value = "打包任务下发:0否1是")
    private Integer packIssue;

    @ApiModelProperty(value = "贴单任务下发:0否1是")
    private Integer pasteIssue;

    @ApiModelProperty(value = "订单排序")
    private Integer orderNum;

    @ApiModelProperty(value = "订单排序下限")
    private Integer orderNumStart;

    @ApiModelProperty(value = "订单排序上限")
    private Integer orderNumEnd;

    @ApiModelProperty(value = "预打包单号")
    private String prepackagedCode;

    @ApiModelProperty(value = "复核数量")
    private BigDecimal recheckQuantity;

    @ApiModelProperty(value = "是否预打包订单:0否1是")
    private Integer prepackaged;

    @ApiModelProperty(value = "收件人ID")
    private String oaid;

    @ApiModelProperty(value = "体积")
    private BigDecimal volume;

    @ApiModelProperty(value = "包材名称")
    private String packingMaterialName;

    @ApiModelProperty(value = "是否根据波次进行精确查找",hidden=true)
    private boolean wavePickingCodeFullQuery;

    @ApiModelProperty(value = "包裹数")
    private Integer packageNum;

    @ApiModelProperty(value = "拆分运单号")
    private String splitWaybillCode;

    @ApiModelProperty(value = "店铺手机号")
    private String shopNickPhone;

    //等同于goodsSortQuantityStart
    @ApiModelProperty(value = "种数下限")
    private BigDecimal skuFloor;

    //等同于goodsSortQuantityEnd
    @ApiModelProperty(value = "种数上限")
    private BigDecimal skuCeiling;

    @ApiModelProperty(value = "总数下限")
    private BigDecimal totalNumFloor;

    @ApiModelProperty(value = "总数上限")
    private BigDecimal totalNumCeiling;

    @ApiModelProperty(value = "包裹数下限")
    private BigDecimal packageNumStart;

    @ApiModelProperty(value = "包裹数上限")
    private BigDecimal packageNumEnd;

    @ApiModelProperty(value = "出库完成时间（开始）")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime outboundCompletionTimeStart;

    @ApiModelProperty(value = "出库完成时间（结束）")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime outboundCompletionTimeEnd;

    @ApiModelProperty(value = "获取面单失败原因")
    private String failureReasonOfGettingWaybill;

    @ApiModelProperty(value = "请求入参")
    private String requestParam;

    @ApiModelProperty(value = "是否积压订单,1-是，0-否")
    private Integer backlogOrder;

    @ApiModelProperty(value = "任务状态，1-未执行，2-执行中，3-执行完成")
    private String taskStatus;






}
